package xyz.hubery.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 返回状态码枚举类
 */
@Getter
@AllArgsConstructor
public enum CodeEnum {
    // 正常
    SUCCESS(200, "OK"),
    SYSTEM_ERROR(500, "SYSTEM_ERROR"), //系统异常
    PARAMETER_ERROR(601, "参数异常"),
    INSERT_USER_ERROR(602, "用户名已存在"),
    USER_NOT_EXIST(603, "用户不存在"),
    PRODUCT_TYPE_LEVEL_ERROR(604,"商品类型错误" ),
    PRODUCT_TYPE_NOT_EMPTY(605, "请先删除子类型"),
    SPECIFICATION_NOT_EXIST(606,"不存在该规格" ),
    REGISTER_CODE_ERROR( 607,  "验证码错误"),
    REGISTER_REPEAT_PHONE_ERROR( 608, "手机号重复" ),
    REGISTER_REPEAT_NAME_ERROR(609, "用户名重复" ),
    LOGIN_NAME_PASSWORD_ERROR(610, "用户名密码错误" ),
    LOGIN_CODE_ERROR(611,"登陆验证码错误" ),
    LOGIN_NOPHONE_ERROR(612,"手机号不存在" ),
    QR_CODE_ERROR( 613, "二维码错误" ),
    CHECK_SIGN_ERROR( 614,"验签失败"),
    ORDER_STATUS_ERROR(615, "订单状态异常" ),
    NO_STOCK_ERROR(616, "库存不足"),
    ORDER_EXPIRED_ERROR( 617, "订单已过期" ),
    SECKILL_GOODS_IN_SECKILLING(618 , "商品正在秒杀中" ),
    GOODS_NOT_FOUND(619, "商品不存在" );

    private final Integer code;
    private final String message;
}